<template>
    <Page style="background-color: #EEE;">
        <span>login</span>
        <LoadingButton :click="GoHome" type="success">登录</LoadingButton>
    </Page>
</template>
<script setup>
import { useRouter } from 'vue-router';
import { setToken } from '@/utils/auth';
const router = useRouter();

const GoHome = function () {
    return new Promise((resolve, reject) => {
        setToken('Test');
        setTimeout(() => {
            router.push('/index/home');
            resolve();
        }, 1000)
    })
}

</script>
<style lang="less" scoped></style>